#

| Chapter 2 UNIX Commands |

## dbx

    /usr/ucb/dbx [options] [objfile [corefile]]

Solaris 2.0 only. A source code debugger for programs written in C, C++, Pascal, and FORTRAN. Programs compiled with the -g option of cc (and other compilers) produce `objfile`, an object file that includes a symbol table. `corefile` contains the core image produced when `objfile` is executed. a.out is the default object file, and core is the default `corefile`. Dbx commands can be stored in a start-up .dbxinit file that resides in the current directory or in the user's home directory. Dbx executes these commands just before reading the symbol table. See Section 20 for more information on dbx.

### Options

-c `cmd`

  Run dbx `cmd` after initialization.

-C

  Collect profile data for debugged program.

-e

  Echo input commands on standard output.

-i

  Act as if standard input is a terminal.

-I `dir`

  Add `dir` to the directory search path. The dbx command use resets the search path.

-kbd

  Debug a program that puts the keyboard in up-down translation mode.

-P `file_des`

  Pipe output to the debugger command via file descriptor `file_des`. debugger passes this option automatically.

-q

  Suppress messages during loading (useful during auto-traceback).

-r

  Execute `objfile` right away, then wait for user response from the keyboard.

-s `file`

  Read initialization commands from start-up `file`.

-sr `tmp`

  Like -s, but then delete start-up file (`tmp`).

- `pid`

  Debug a currently running program whose process ID is `pid` (used mainly for auto-traceback).

Reference: date |  | Reference: dc